<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)</TargetFrameworks>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <DefineConstants>$(DefineConstants);REGISTRY_ASSEMBLY</DefineConstants>
    <NoWarn>$(NoWarn);CA2249</NoWarn>
    <UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>
  </PropertyGroup>

  <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
  <PropertyGroup>
    <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
    <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' != 'windows'">SR.PlatformNotSupported_Registry</GeneratePlatformNotSupportedAssemblyMessage>
    <NoWarn Condition="'$(TargetPlatformIdentifier)' != 'windows'">$(NoWarn);IDE0280</NoWarn> <!-- https://github.com/dotnet/runtime/issues/84104 -->
  </PropertyGroup>
  <ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''">
    <Compile Include="$(CommonPath)DisableRuntimeMarshalling.cs"
             Link="Common\DisableRuntimeMarshalling.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Interop.Errors.cs"
             Link="Common\Interop\Windows\Interop.Errors.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.FormatMessage.cs"
             Link="Common\Interop\Windows\Interop.FormatMessage.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
             Link="Common\Interop\Windows\Interop.Libraries.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Advapi32\Interop.RegCloseKey.cs"
             Link="Common\Interop\Windows\Interop.RegCloseKey.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Advapi32\Interop.RegConnectRegistry.cs"
             Link="Common\Interop\Windows\Interop.RegConnectRegistry.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Advapi32\Interop.RegCreateKeyEx.cs"
             Link="Common\Interop\Windows\Interop.RegCreateKeyEx.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Advapi32\Interop.RegDeleteKeyEx.cs"
             Link="Common\Interop\Windows\Interop.RegDeleteKeyEx.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Advapi32\Interop.RegDeleteTree.cs"
             Link="Common\Interop\Windows\Interop.RegDeleteTree.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Advapi32\Interop.RegDeleteValue.cs"
             Link="Common\Interop\Windows\Interop.RegDeleteValue.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Advapi32\Interop.RegEnumKeyEx.cs"
             Link="Common\Interop\Windows\Interop.RegEnumKeyEx.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Advapi32\Interop.RegEnumValue.cs"
             Link="Common\Interop\Windows\Interop.RegEnumValue.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Advapi32\Interop.RegFlushKey.cs"
             Link="Common\Interop\Windows\Interop.RegFlushKey.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Advapi32\Interop.RegOpenKeyEx.cs"
             Link="Common\Interop\Windows\Interop.RegOpenKeyEx.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Advapi32\Interop.RegQueryInfoKey.cs"
             Link="Common\Interop\Windows\Interop.RegQueryInfoKey.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Advapi32\Interop.RegQueryValueEx.cs"
             Link="Common\Interop\Windows\Interop.RegQueryValueEx.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Advapi32\Interop.RegSetValueEx.cs"
             Link="Common\Interop\Windows\Interop.RegSetValueEx.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Advapi32\Interop.RegistryConstants.cs"
             Link="Common\Interop\Windows\Advapi32\Interop.RegistryConstants.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Interop.BOOL.cs"
             Link="Common\Interop\Windows\Interop.BOOL.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.SECURITY_ATTRIBUTES.cs"
             Link="Common\Interop\Windows\Interop.SECURITY_ATTRIBUTES.cs" />
    <Compile Include="$(CoreLibSharedDir)Microsoft\Win32\SafeHandles\SafeRegistryHandle.cs"
             Link="Microsoft\Win32\SafeHandles\SafeRegistryHandle.cs" />
    <Compile Include="Microsoft\Win32\Registry.cs" />
    <Compile Include="Microsoft\Win32\RegistryHive.cs" />
    <Compile Include="Microsoft\Win32\RegistryValueKind.cs" />
    <Compile Include="Microsoft\Win32\RegistryKey.cs" />
    <Compile Include="Microsoft\Win32\RegistryKeyPermissionCheck.cs" />
    <Compile Include="Microsoft\Win32\RegistryOptions.cs" />
    <Compile Include="Microsoft\Win32\RegistryValueOptions.cs" />
    <Compile Include="Microsoft\Win32\RegistryView.cs" />
    <Compile Include="System\Security\AccessControl\RegistryRights.cs" />
    <Compile Include="System\Security\AccessControl\RegistrySecurity.cs" />
  </ItemGroup>

  <ItemGroup>
    <Reference Include="System.Collections" />
    <Reference Include="System.Memory" />
    <Reference Include="System.Runtime" />
    <Reference Include="System.Runtime.InteropServices" />
    <Reference Include="System.Security.AccessControl" />
    <Reference Include="System.Security.Principal.Windows" />
  </ItemGroup>

</Project>
